<html>
<head>
<title>Matrix - Lottery</title>
<meta http-equiv="Content-Type" content="text/html" />
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<link rel="stylesheet" type="text/css" href="css/style.css" />
</head>
<body>
<?php htmlBody();?>
</body>
</html>
<?php
function htmlBody()	{
	if(isset($_GET["mark"]))	{
		$mark	=	$_GET["mark"];
	}
	else	{
		$mark	=	False;
	}
	if(isset($_GET["mod"]))	{
		$mod	=	$_GET["mod"];
	}
	else	{
		$mod	=	"twoball";
	}
	echo '<a href="index.htm">返回</a> ';
	echo '<a href="matrix.php?mod=twoball">双色球</a> ';
	echo '<a href="matrix.php?mod=lotto">大乐透</a> ';
	echo '<a href="matrix.php?mod=26s5">福彩26选5</a> ';
	echo '<a href="matrix.php?mod=3d">福彩3D</a>';
	csv2matrix($mark,$mod);
}
?>
<?php
function csv2matrix($mark,$mod)	{
	$sMod	=	$mod;
	include_once("inc/file2history.php");
	$aHistory	=	file2history("history/".$sMod.".csv");
	include_once("inc/lotteryMod.php");
	$aMod		=	lotteryMod("lotteryMod/".$sMod.".csv");
	include_once("inc/history2matrix.php");
	$strTable	=	history2matrix($aHistory,$aMod,$mark);
	echo $strTable;
}
?>